<%--
  Created by IntelliJ IDEA.
  User: chongge
  Date: 2024/1/9
  Time: 22:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<script src="/js/util.js" type="text/javascript" charset="UTF-8">
</script>
<body>
<form action="res_action.jsp" onsubmit = "return checkForm()">
    账号:<input type="text" name="name" id="name" autocomplete="off"><br>
    密码:<input type="password" name="pwd" id="pwd"><br>
    年龄:<input type="text" name="age" id="age"><br>
<%--    入职时间: <input type="date" name="hiredate"><br>--%>
    <input type="submit" value="注册">
</form>
<script>
    function checkForm(){
        var name = $("name").value;
        // alert(name);
        var pwd = $("pwd").value;
        var age = $("age").value;
        if (name==""||pwd==""||age==""){
            alert("文本框内不能为空,请重新输入");
            return false;
        }else{
            return true;
        }
    }
</script>
</body>
</html>
